package com.macro.mall.tiny.modules.foster.controller;

import com.macro.mall.tiny.common.api.CommonResult;
import com.macro.mall.tiny.modules.foster.service.EmailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author ZhuYi
 * @create 2024/3/26 20:26
 */
@Api(tags = "EmailController", description = "邮箱管理，已弃用")
@RestController
@RequestMapping("/foster/email")
@CrossOrigin
public class EmailController {

    @Autowired
    private EmailService emailService;

    @ApiOperation(value = "邮箱发送验证码")
    @RequestMapping(value = "/sendAuthCodeEmail", method = RequestMethod.POST)
    public CommonResult getMailCode(@RequestParam String email) {
        CommonResult commonResult = emailService.sendAuthCode(email);
        return commonResult;

    }

}
